1. Field of the Invention
The present invention relates to an image processing apparatus for drawing the inside of an image area which is expressed on the basis of vector data.
2. Related Background Art
Hitherto, as an image processing system according to an internal drawing of an area, as shown in JP-A-60-132271 or the like, there has been proposed a typical method in the case of writing into a memory on the basis of the exclusive OR process applied to boundary line data and a predetermined painted pattern. As shown in JP-A-50-14230, there has been proposed a typical method in the case of painting a pixel into a memory corresponding to an interval between 1 and 1 of the dots on a scanning line which are obtained by scanning outline data. As shown in "COMPUTER GRAPHICS", The Society of Japan Computer, pages 466 to 472, Jul. 15, 1984, there has been proposed a typical method in the case of painting a pixel into a memory on the basis of an outline table or the like which has been formed for that purpose.
FIGS. 15(a) to 15(e) are diagrams for explaning an example of a closed figure painting process. In FIG. 15(a), a closed figure 50 is constructed by four boundary lines 51 to 54. Reference numeral 55 denotes painted portions. Painting is executed by the exclusive OR process applied to the painted pattern 55 and the boundary lines 51 to 54.
The boundary lines 51 to 54 constructing the closed figure 50 are expressed by three or more vector data in which a start point 61 and an end point 62 are used as parameters. A painting range (in the area surrounded by the alternate long-and-short-dash line in the diagram) is specified on the basis of the parameters of the start point and end point of the vector data.
According to the above system, the painted pattern is also written simultaneously with the boundary lines 51 to 54 being sequentially directly written into a full dot memory (not shown).
FIG. 15(b) shows a state in which only the boundary line 51 is written into the full dot memory and, at the same time, the painted pattern 55 is also written from the boundary line data. The boundary line 51 is drawn by generating dots one by one for the interval from the start point 61 to the end point 62. At this time, the painted pattern 55 of one raster in the lateral direction (direction of an x axis) is written in the specified painting range from the adjacent dot position on the right side upon generation of each dot. At this time, the exclusive OR of the pattern being written and the data which has already been written in the memory is calculated and written into the full dot memory. Therefore, if at a particular pid the pattern now being written is "1" and the data stored in the memory is "1", data "0" is written into the memory.
When dots are generated for the interval from the start point 61 to the end point 62 of the boundary lines 51 to 54, the dot data is sequentially written into the closed figure 50 by the exclusive OR processes as shown in FIGS. 15(b) to 15(e).
FIG. 16 is a diagram for explaining the closed figure painting principle. Reference numeral 65 denotes a memory and this diagram corresponds to the state in which a closed figure 66 is stored.
Reference numeral 77 denotes a scanning line. The data "0" between the crossing positions of the scanning line 77 with the closed figure 66, that is, the "0" signals for the intervals of 1-2, 3-4, and 5-6 in FIG. 16, are converted into "1" signals and the painting process on one line is executed. The area in the closed figure 66 is painted out by sequentially executing the above painting process in the scanning direction.
However, the above conventional painting process has the following problems.
In the painting process for converting the "0" signals between the "1" signals on the scanning line into the "1" signals, process and the hardware construction are simple. However, in, a case where the scanning line and the vertices of the outline cross, that is, if the number of crossing points with the outline is an odd number, painting is not correctly executed. Therefore, an-exceptional process must be performed at such points and the processing time depends on the shape of the figure.
On the other hand, in the case of executing the painting process by the exclusive OR process, since the logic arithmetic operating time per unit dot is long, in many cases, the overall processing speed becomes slow. In addition, it is troublesome to deal with the painted pattern.
Further, in the painting process carried out using an outline table, as the figure shape becomes more complicated, the number of outline points also increases. However, if the number of outline points exceeds the set outline table capacity, a predetermined process to thin out the number of outline points is executed. Thus, there are problems such that an approximate figure shape different from the original figure shape is painted, and the print quality is deteriorated and the like.
FIG. 17 is a diagram for explaining the painting process which was an outline table.
FIG. 18 is an explanatory diagram showing a polygonal outline table which is defined by vectors shown in FIG. 17.
As will be understood from the diagrams, in the case of painting a figure 80 surrounded by vectors e.sub.1 to e.sub.6, all of the vectors e.sub.1 to e.sub.6 are first set into the downward directions as shown in FIG. 17. Next, an outline table 81 as shown in FIG. 18 is formed. After sorting by the y coordinate having a smaller-vector for each y coordinate, the vectors starting from such a y coordinate are linked, thereby forming the outline table 81. Data of a vector to be linked includes: the maximum value of the y coordinate values of the vector; the minimum value of the x coordinate values and its change amount; a pointer of the next vector; and the like. For the outline table 81 formed as mentioned above, evaluation is sequentially executed in accordance with the order from the small y coordinate. The portion sandwiched by two vectors, for instance, the intervals on the scanning line shown in FIG. 16 (the interval from 2 to 4 and the interval from 7 to 13 as x coordinate values) are painted out.
However, the above conventional painting process has the following problems.
In the printing process to convert the "0" signals between the "1" signals on the scanning line into the "1" signals, process and hardware construction are simple. However, it is necessary to use a memory to previously store the outline for its processing, so that a memory of a large capacity is needed to paint a large closed figure. In addition, as a result of the necessity of such a memory, the costs of the hardware circuits rise substantially. Further, in the-case where the scanning line and the vertices of the outline cross, that is, if the number of crossing points with the outline is an odd number, an exceptional process must be executed at such points.
On the other hand, in the case of executing the painting process by the exclusive OR process, since the process is simple, the processing speed is fast. However, since the exclusive OR is also calculated in c portion which does not need to be painted, although a-problem hardly occurs in the case of a small figure, if a size of figure is large, the reversal area increases in proportion to the square, so that the processing time becomes extremely long. On the other hand, if a figure becomes complicated, the number of reversal times increases and the processing time becomes long.
Further, in the painting process using the outline table, although a figure of a large size can be painted by using a memory of a relatively small capacity, it takes a long time for processing. Moreover, as the figure shape becoes complicated, the number of outline points, that is, the number of vectors constructing a polygon, increases. If the number of outline points exceeds the set outline table capacity, a predetermined process to thin out the number of outline points is executed, so that there are problems such that an approximate figure shape different from the original figure shape is painted, the print quality is deteriorated, and the like.